import bufan from '../uslit/jidizhi.js'

export const request = (pormi) => {
  wx.showLoading({
    title:'加载中',
    mask:true,
  })
  return new Promise((resolve, reject) => {
    wx.request({
      url: bufan + pormi.url,
      data: pormi.data,
      method: pormi.method,
      success: (res) => {
        resolve(res)
      },
      fail: (err) => {
        reject(err)
      },
      complete:()=>{
        wx.hideLoading()
      }
    })
  })
}